<?php echo $this->doctype(); ?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <?php $this->headMeta()->prependHttpEquiv('Content-Type','text/html; charset=utf-8') ;?>
  <?php echo $this->headMeta() ;?>
  <?php if ($this->isLogged) $this->headTitle('Edit mode') ; ?>
  <?php $this->headTitle($this->loggedTitle) ;?>
  <?php $this->headTitle()->setSeparator(' :: ') ; ?>
  <?php echo $this->headTitle(); ?>
  <?php $this->headLink()->appendStylesheet($this->websiteUrl . 'system/css/seotoaster.css'); ?>
  <?php $this->headLink()->appendStylesheet($this->websiteUrl .'system/js/thickbox/thickbox.css'); ?>  
  <?php echo $this->headLink(); ?>
  <?php $this->headScript()->prependFile((false !== @file_get_contents(RCMS_Object_QuickConfig_QuickConfig::G_JQ_HOSTED_URL)) ? RCMS_Object_QuickConfig_QuickConfig::G_JQ_HOSTED_URL : $this->websiteUrl . 'system/js/jquery/jquery.js'); ?>
  <?php $this->headScript()->appendFile($this->websiteUrl . 'system/js/thickbox/thickbox.js'); ?>
  <?php $this->headScript()->appendFile($this->websiteUrl . 'system/js/system.js'); ?>
  <?php $this->headScript()->appendFile($this->websiteUrl . 'system/js/menu.js'); ?>
  <?php echo $this->headScript(); ?>
</head>
	<?php
		if(($this->isLogged || $this->memberLogged)) {
			$langId = $_SESSION[$this->websiteUrl]['langId'];
			$translator = new RCMS_Object_Parser_LanguageParser($langId);
			switch ($this->currentUser->getRoleId()) {
				case RCMS_Object_User_User::USER_ROLE_ADMIN: 
					echo$translator->processScreen($this->render('frontadmin.phtml'));
				break;
				case RCMS_Object_User_User::USER_ROLE_USER:
					echo $translator->processScreen($this->render('user.phtml'));
				break;
				case RCMS_Object_User_User::USER_ROLE_SUPERADMIN:
					echo $translator->processScreen($this->render('frontsuperadmin.phtml'));
				break;
				case RCMS_Object_User_User::USER_ROLE_MEMBER:
					if(!$this->hidePanel) {
						echo $translator->processScreen($this->render('member.phtml'));
					}
				break;
				default:
					return;
				break;
			}
		}
	?>
	<body onload="replaceNSP();">
	<input type="hidden" id="hid-main-wsurl" name="hid-main-wsurl" value="<?php echo $this->websiteUrl; ?>" />
	<?php echo RCMS_Tools_Tools::stripSlashesIfQuotesOn($this->layout()->content); ?>
</body>
</html>
